<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <form v-on:submit.stop.prevent="tijiao">
        <!-- <form v-on:submit.stop.prevent>   只阻止行为，不添加新的行为 -->
            <input type="text" name="userName">
            <input type="submit" value="提交">
        </form>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data:{},
            methods: {
                tijiao(){
                    console.log("prevent阻止了默认的重新加载页面")
                }
            }
        
        })
    </script>
</body>
</html>